package org.qpcr.community.standalone.web.response.dashboard;

import java.util.Objects;

/**
 * 实验趋势数据对象
 */
public class ExperimentTrend {
    private String date;
    private Integer completed;
    private Integer abnormal;

    // 构造函数
    public ExperimentTrend() {}

    public ExperimentTrend(String date, Integer completed, Integer abnormal) {
        this.date = date;
        this.completed = completed;
        this.abnormal = abnormal;
    }

    // Getter 和 Setter
    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Integer getCompleted() {
        return completed;
    }

    public void setCompleted(Integer completed) {
        this.completed = completed;
    }

    public Integer getAbnormal() {
        return abnormal;
    }

    public void setAbnormal(Integer abnormal) {
        this.abnormal = abnormal;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ExperimentTrend that = (ExperimentTrend) o;
        return Objects.equals(date, that.date) &&
                Objects.equals(completed, that.completed) &&
                Objects.equals(abnormal, that.abnormal);
    }

    @Override
    public int hashCode() {
        return Objects.hash(date, completed, abnormal);
    }

    @Override
    public String toString() {
        return "ExperimentTrend{" +
                "date='" + date + '\'' +
                ", completed=" + completed +
                ", abnormal=" + abnormal +
                '}';
    }
}